<%@ page import="com.dao.searchdao" %>
<%@ page import="com.dao.searchdaoimpl" %>
<%@ page import="java.util.List" %>
<%@ page import="com.entity.user" %>
<%@ page import="com.dao.UserInfDao" %>
<%@ page import="com.entity.order" %>
<%@ page import="com.entity.orderdetails" %>
<%@ page import="com.entity.productdetails" %><%--
  Created by IntelliJ IDEA.
  User: 刘锦华
  Date: 2022/3/14
  Time: 16:40
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>个人中心</title>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"/>
    <meta name="renderer" content="webkit"/>
    <link type="text/css" rel="stylesheet" href="https://static.zhanghaodaren.cn/zhdrpc/common/common.css"/>
    <link type="text/css" rel="stylesheet" href="https://static.zhanghaodaren.cn/zhdrpc/css/per-center.css" />
    <link type="text/css" rel="stylesheet" href="css/grzx.css">
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
    <meta name="renderer" content="webkit" />

    <meta name="keywords" content="个人中心" />
    <meta name="description" content="个人中心" />
    <link type="text/css" rel="stylesheet" href="https://static.zhanghaodaren.cn/zhdrpc/css/order.css" />
    <link rel="shortcut icon" href="../favicon.ico" />
    <script>
        var cookies=document.cookie="yemian=grzy";
    </script>
</head>
<body>
<!-- 通用Js库 Start -->
<script type="text/javascript" src="https://static.zhanghaodaren.cn/zhdrpc/common/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="https://static.zhanghaodaren.cn/zhdrpc/common/common.js"></script>
<!-- 通用Js库 End -->
<!-- 通用顶部 Start -->
<div class="top-common-box">
    <div class="top-common">
        <div class="top-common-left">
            <a href="#">您好，欢迎来到租号狗！</a>
        </div>
        <%
            searchdao s =new searchdaoimpl();
            String id=s.searchcookie(request);
            if(id.equals(""))
            {
        %>
        <div class="top-common-right">
            <ul>
                <li class="line"><a href="denglu.jsp">请登录</a></li>
                <li class="line"><a href="zhuce.jsp">请注册</a></li>
                <li class="line"><a href="#">个人中心</a></li>
            </ul>
        </div>
        <%
        }
        else
        {
        %>
        <div class="top-common-right">
            <ul>
                <li class="line"><a href="grzhuye.jsp" id="tcdlan">退出登录</a></li>
                <li class="line"><a href="#">个人中心</a></li>
            </ul>
        </div>
        <%
            }
        %>
    </div>
    <script>
        var tcdlan=document.getElementById("tcdlan");
        tcdlan.onclick=function() {
            var expires=new Date();
            expires.setTime(expires.getTime()-1);
            document.cookie="dlid=;expires="+expires.toLocaleTimeString();
        }
    </script>
</div>
<script type="text/javascript" src="../zhdrpc/common/qiYu.js"></script>
<!-- 通用顶部 End --><div class="header-box new-header">
    <div class="header clearfix">
        <h1 class="logo">
            <a href="/" title="租号狗">
                <img src="images/385_385/6BEDBDAD244556EFFC477D864327769F.jpg" alt="LOGO">
                <em>租号狗</em>
            </a>
        </h1>
    </div>
</div>
<script type="text/javascript">
    var staticResourceURL = 'https://static.zhanghaodaren.cn/zhdrpc';
    var merchantQq = '';
    var qqLink = 'https://qiyukf.com/client?k=a2c587490ed80490f9097c01191beb40';
    var wangwang = ' ';
    var domain = 'zuhaogu.zhanghaodaren.cn';
    var showAccountLogin = 'false';
    var cotenantType = '1';
</script>
<script type="text/javascript" src="https://static.zhanghaodaren.cn/zhdrpc/common/popup/popup.js"></script>
<script type="text/javascript" src="https://static.zhanghaodaren.cn/zhdrpc/js/main-search.js"></script>
<script type="text/javascript" src="../zhdrpc/common/search_v2.js"></script>
<script type="text/javascript" src="/static/scripts/common/float-menu.js"></script>
<!-- 通用导航 Start -->
<div class="nav">
    <ul class="w1200 clearfix">
        <li class="navlong"><a href="zhuye.jsp" >首页</a></li>
        <li><a href="zuhaodating.jsp" >租号大厅</a></li>
        <li><a href="maihao.jsp" >闲置账号赚钱</a></li>
        <li><a href="#" class="on">个人中心</a></li>
    </ul>
</div>
<!-- 通用导航 End -->

<script type="text/javascript" src="https://static.zhanghaodaren.cn/zhdrpc/common/popup/popup.js"></script>
<script type="text/javascript" src="https://static.zhanghaodaren.cn/zhdrpc/common/md5.js"></script>
<script type="text/javascript" src="https://static.zhanghaodaren.cn/zhdrpc/common/Validform-v5.3.2.min.js"></script>
<script type="text/javascript" src="../zhdrpc/common/random.js"></script>
<script type="text/javascript" src="../zhdrpc/common/cooperate.js"></script>
<div class="main-box">
    <div class="logKey-box-container main-common-box pay-box-container">
        <div class="pay-menu" id="perSubNav">
            <ul>
                <li class="red"><a href="#" data-value="..">主页<em class="iconfont">></em></a></li>
                <li><a href="zhjilu.jsp" data-value="..">租号记录</a></li>
                <li><a href="yue.jsp" data-value="..">余额</a></li>
            </ul>
        </div>

        <div class="orderDetails-box-container zdmx clearfix">
            <div class="pay-content">
                <h1 class="pay-title">
                    <i></i><span>出租记录</span>
                </h1>
                <div class="weadmin-body">
                    <div class="pg-content">
                        <div class="content left">
                            <div style="background-color: white">
                                <div class="biao">
                                    <table>
                                        <tr>
                                            <th>游戏种类</th>
                                            <th>游戏</th>
                                            <th>账号</th>
                                            <th>区服</th>
                                            <th>买家</th>
                                            <th>单价</th>
                                            <th>租出时长(时)</th>
                                            <th>价格</th>
                                        </tr>
                                        <%
                                            UserInfDao u=new UserInfDao();
                                            String sql1="select * from myorder where User2ID=?";
                                            List<order> list=u.getForList(order.class,sql1,id);
                                            for (int i = 0; i < list.size(); i++) {
                                                String odid=list.get(i).getODID();
                                                System.out.println("odid="+odid);
                                                String sql2="select * from orderdetails where ODID=?";
                                                List<orderdetails> list2 =u.getForList(orderdetails.class,sql2,odid);
                                                for (int j = 0; j < list2.size(); j++) {
                                                    String pid=list2.get(j).getProductID();
                                                    System.out.println("pid="+pid);
                                                    String sql3="select * from productdetails where ProductID=?";
                                                    List<productdetails> list3 =u.getForList(productdetails.class,sql3,pid);
                                                    for (int k = 0; k < list3.size(); k++) {
                                        %>
                                        <tr>
                                            <td><%=s.searchfname(list3.get(k).getPDID())%></td>
                                            <td><%=s.searchname(list3.get(k).getPDID())%></td>
                                            <td><%=list3.get(k).getAccount()%></td>
                                            <td><%=list3.get(k).getZone()%></td>
                                            <td><%=list.get(i).getUser1ID()%></td>
                                            <td><%=list3.get(k).getUnitPrice()%></td>
                                            <td><%=list2.get(j).getODTime()%></td>
                                            <td><%=list2.get(j).getODPrice()%></td>
                                        </tr>
                                        <%
                                                    }
                                                }
                                            }
                                        %>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <script>

            /**
             * 通用一句话弹出层
             * tit：弹出层标题
             * txt：弹出层文本
             * qxflag：true有取消按钮,false没有取消按钮
             * fun1：确认回调函数
             * fun2：取消回调函数
             **/
            function AlertCom(tit, txt, qxflag, fun1, fun2, btn1txt, btn2txt) {
                var _btn_box1;
                var _btn_box2;
                if (typeof btn1txt == "undefined") {
                    _btn_box1 = '<p class="popup-btn"><a href="javascript:void(0)" class="com-btn-03 color01 confirm-btn">确 认</a></p>';
                } else {
                    _btn_box1 = '<p class="popup-btn"><a href="javascript:void(0)" class="com-btn-03 color01 confirm-btn">' + btn1txt + "</a></p>";
                }
                if (typeof btn2txt == "undefined") {
                    var _btn_box2 = '<p class="popup-btn"><a href="javascript:void(0)" class="com-btn-03 color01 confirm-btn">确 认</a><a href="javascript:void(0)" class="com-btn-03 color03 cancel-btn">取 消</a></p>';
                } else {
                    var _btn_box2 = '<p class="popup-btn"><a href="javascript:void(0)" class="com-btn-03 color01 confirm-btn">' + btn1txt + '</a><a href="javascript:void(0)" class="com-btn-03 color03 cancel-btn">' + btn2txt + "</a></p>";
                }
                if (qxflag) {
                    btn_box = _btn_box2;
                } else {
                    btn_box = _btn_box1;
                }
                layer.open({
                    type: 1,
                    skin: "com-popup",
                    area: "400px",
                    title: tit,
                    shadeClose: true,
                    content: '<div class="compop-box">' + "<h2>" + txt + "</h2>" + btn_box + "</div>",
                    success: function() {
                        $(".confirm-btn").click(function() {
                            try {
                                fun1();
                            } catch(e) {}
                            layer.closeAll();
                        });
                        $(".cancel-btn").click(function() {
                            try {
                                fun2();
                            } catch(e) {}
                            layer.closeAll();
                        });
                    }
                });
            }

        </script>

        <script type="text/javascript" src="https://static.zhanghaodaren.cn/zhdrpc/common/Validform-v5.3.2.min.js"></script>
        <script type="text/javascript" src="https://static.zhanghaodaren.cn/zhdrpc/common/datepicker/WdatePicker.js"></script>
        <script type="text/javascript" src="/static/scripts/order/buyFlow.js"></script>
        <script type="text/javascript" src="https://static.zhanghaodaren.cn/zhdrpc/common/md5.js"></script>


        <script type="text/javascript" src="/static/scripts/common/jsFloatCompute.js"></script>
        <script type="text/javascript" src="/static/scripts/pay/pay.js"></script>
        <script>
            var domainStatus ='1';

            $(function(){
                $(".pay-way-val").find("div").click(function(){
                    $(this).addClass("on").siblings().removeClass("on")
                })
            })
        </script>
    </div>
</div>

<script src="../lib/layui/layui.js" charset="utf-8"></script>
<script src="../static/js/eleDel.js" type="text/javascript" charset="utf-8"></script>

<script>
    $(function () {
        var url = window.location.href;
        $('#perSubNav').find('ul li a').each(function () {
            var $this = $(this);
            if(!$this.attr('data-value')) return true;
            var list = $this.attr('data-value').split('||');
            for (var i = 0,len = list.length;i<len;i++){
                if(url.indexOf(list[i]) != -1){
                    $this.parent().addClass('red');
                    $this.html($this.text()+ '<em class="iconfont">&#xe64c;</em>');
                    return false;
                }
            }
        })
    })
</script>
<div class="footer">
    <div class="footer-01">
        <div class="footer-server-box">
            <div class="footer-server">
                <div class="footer-server-dl">
                    <dl>
                        <dt><img src="https://static.zhanghaodaren.cn/zhdrpc/images/img/footer-img01.png" alt="" /></dt>
                        <dd><h2>省心交易 快捷上号</h2></dd>
                    </dl>
                    <dl>
                        <dt><img src="https://static.zhanghaodaren.cn/zhdrpc/images/img/footer-img02.png" alt="" /></dt>
                        <dd><h2>7*24小时 专属客服</h2></dd>
                    </dl>
                    <dl>
                        <dt><img src="https://static.zhanghaodaren.cn/zhdrpc/images/img/footer-img03.png" alt="" /></dt>
                        <dd>
                            <h2>优质服务 安全可靠</h2>
                        </dd>
                    </dl>
                </div>
            </div>
        </div>
    </div>
    <script>
        var _hmt = _hmt || [];
        (function() {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?a267eac679d353feef3ec01ab62aa94d";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
    <script type="text/javascript" src="../zhdrpc/common/qiYu.js"></script>
    <script type="text/javascript">
        var _hmt = _hmt || [];
        (function() {
            var hm = document.createElement("script");
            hm.src = "//hm.baidu.com/hm.js?64dcdabba4b3b0c4da826efe00a47636";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
</div>
</body>
</html>
